<template>
	<view class="">
		<u-popup :show="CallShow" mode='center' :closeOnClickOverlay='false' @close="close">
			<view class="popu-call">
				<text class="title">Msg</text>
				<view class="content">
					<u--textarea v-model="msg" placeholder="..." count ></u--textarea>
				</view>
				<button class="btn-primary ok" @click="sendCall">ok</button>
			</view>
		</u-popup>
	</view>
</template>

<script>

	export default {
		
		data(){
			return {
				CallShow:false,
				msg:''
			}
			
		},
	
		methods:{
			openPopu(){
				this.CallShow = true 
			},
			close(){
				// this.CallShow = false 
				this.msg = ''
			},
			sendCall(){
				let smgData = {
					type:'呼叫服务员',
					msg:this.msg
				}
				this.bus.$emit('SendMessage',{
					message: JSON.stringify(smgData),
					from: this.getDeName(),
					to: 'admin'
				})
				this.msg = ''
				this.CallShow = false 
			}
		}
		
	}
</script>

<style scoped lang="scss">
	.popu-call{
		width: 386px;
		padding: 20px 16px;
		box-sizing: border-box;
		background-color: $qy-bg-popu-conten-color;
		display: flex;
		flex-direction: column;
		align-items: center;
		border-radius: 10px;
		color: $uni-text-color;
		font-size: 14px;
		position: relative;
		
		.title{
			font-size: 17px;
		}
		.content{
			width: 100%;
			// padding: 20upx;
			box-sizing: border-box;
			border-radius: 10px;
			background: $qy-bg-nav-option-color;
			margin-top: 30upx;
			line-height: 30upx;
		}
		.ok{
			width: 100upx;
			margin-top: 30upx;
		}
	}
</style>